var webpack = require('webpack');
var WebpackDevServer = require('webpack-dev-server');
var config = require('./webpack.config');

var port = 8080;

//http://webpack.github.io/docs/webpack-dev-server.html#api
new WebpackDevServer(webpack(config), {
	publicPath: config.output.publicPath,
	hot: true,
	historyApiFallback: true,
	contentBase:'app/views/',
	stats: {
		colors: true
	}
}).listen(port,function(err, result) {
	if (err) console.log(err);
	console.log('Listening at localhost:' + port);
});